package com.abner.springcloud.consumer.movie.config;

import com.abner.springcloud.consumer.ribbon.RibbonConfiguration;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Configuration;

/**
 * @Author: Abner.Jiang
 * @Description: 针对于 SPRINGCLOUD-PROVIDER-USER 服务调用的负载均衡策略指定为 自定义的RibbonConfiguration。
 *     RibbonConfiguration 不能放在主应用程序上下文的@ComponentScan所扫描的包中，
 *     否则该类中的配置信息会被所有@RibbonClient共享
 * @Date: Created on 2019/12/17 17:41
 * @ProjectName: springcloud-provider-user
 */
// 针对于某个服务的配置
@Configuration
@RibbonClient(name = "SPRINGCLOUD-PROVIDER-USER",configuration = RibbonConfiguration.class)
//全局配置，为所有Ribbon client提供默认配置
//@RibbonClients(defaultConfiguration = RibbonConfiguration.class)
public class TestRibbonConfiguration {
}
